// 存储,获取，删除本地token
const TT_TK = 'TT_TK'
// 存储
export function setToken (token) {
  localStorage.setItem(TT_TK, JSON.stringify(token))
}

// 获取
export const getToken = () => {
  try {
    return JSON.parse(localStorage.getItem(TT_TK))
  } catch (error) {
    return console.log(error)
  }
}

// 删除
export function removeToken () {
  localStorage.removeItem(TT_TK)
}
